package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.CarUserMapper;
import com.ruoyi.domain.CarUser;
import com.ruoyi.service.ICarUserService;

/**
 * 用户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-09
 */
@Service
public class CarUserServiceImpl implements ICarUserService 
{
    @Autowired
    private CarUserMapper carUserMapper;

    /**
     * 查询用户
     * 
     * @param id 用户主键
     * @return 用户
     */
    @Override
    public CarUser selectCarUserById(Integer id)
    {
        return carUserMapper.selectCarUserById(id);
    }

    /**
     * 查询用户列表
     * 
     * @param carUser 用户
     * @return 用户
     */
    @Override
    public List<CarUser> selectCarUserList(CarUser carUser)
    {
        return carUserMapper.selectCarUserList(carUser);
    }

    /**
     * 新增用户
     * 
     * @param carUser 用户
     * @return 结果
     */
    @Override
    public int insertCarUser(CarUser carUser)
    {
        return carUserMapper.insertCarUser(carUser);
    }

    /**
     * 修改用户
     * 
     * @param carUser 用户
     * @return 结果
     */
    @Override
    public int updateCarUser(CarUser carUser)
    {
        return carUserMapper.updateCarUser(carUser);
    }

    /**
     * 批量删除用户
     * 
     * @param ids 需要删除的用户主键
     * @return 结果
     */
    @Override
    public int deleteCarUserByIds(Integer[] ids)
    {
        return carUserMapper.deleteCarUserByIds(ids);
    }

    /**
     * 删除用户信息
     * 
     * @param id 用户主键
     * @return 结果
     */
    @Override
    public int deleteCarUserById(Integer id)
    {
        return carUserMapper.deleteCarUserById(id);
    }
}
